package demo10.iterator.dinermergeri;

import java.util.ArrayList;
import java.util.Iterator;


/**
 * 煎饼屋的菜单
 * */
public class PancakeHouseMenu implements Menu{
	ArrayList<MenuItem> menuItems;//菜单类的list集合
	 
	public PancakeHouseMenu() {
		menuItems = new ArrayList<MenuItem>();
    
		addItem("K&B's 薄饼早餐", "煎饼加炒蛋和吐司", true,2.99);
 
		addItem("薄煎饼早餐例餐", "薄煎饼配煎蛋、香肠", false,2.99);
 
		addItem("蓝莓煎饼",
			"用新鲜蓝莓和蓝莓糖浆做成的薄煎饼",true,3.49);
 
		addItem("华夫饼","华夫饼，你的蓝莓或草莓的选择",true,3.59);
	}

	public void addItem(String name, String description,
	                    boolean vegetarian, double price)
	{
		MenuItem menuItem = new MenuItem(name, description, vegetarian, price);
		menuItems.add(menuItem);
	}
 
	public ArrayList<MenuItem> getMenuItems() {
		return menuItems;
	}
  
	@Override
	public Iterator<MenuItem> createIterator() {
		// TODO Auto-generated method stub
		return menuItems.iterator();

	}

}
